package com.zhiyun.message;

import java.util.List;

import com.gzit.utils.MD5;
import com.zhiyun.net.Pair;
import com.zhiyun.net.Request;

public class StartCallRequest extends Request {

	private String phoneNo;
	private String password;
	private String targetNo;
	private String callId;

	// 回拨请求发出的时间
	private long startTime = -1;

	@Override
	public List<Pair> getParams() {

		this.callId = MD5.toMD5(this.phoneNo + this.targetNo
				+ System.nanoTime());
		this.startTime = System.currentTimeMillis();
		return Pair.p("phoneNo", phoneNo).p("password", password)
				.p("targetNo", targetNo).p("callId", callId).get();
	}

	@Override
	public void genMetaData() {

		this.setActionPath("startCall");

	}

	public String getPhoneNo() {
		return phoneNo;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public void setPhoneNo(String phoneNo) {
		this.phoneNo = phoneNo;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getTargetNo() {
		return targetNo;
	}

	public void setTargetNo(String targetNo) {
		this.targetNo = targetNo;
	}

	public String getCallId() {
		return callId;
	}

	public void setCallId(String callId) {
		this.callId = callId;
	}

}
